package hungrydemo;

/**
 * @ClassName hungrySingleton
 * @Description 饿汉模式
 * @Author 高达磊
 * @Date 2022/1/11-21:34
 * @Version 1.0
 */
public class HungrySingleton {

    // 本类对象
    private static final HungrySingleton INSTANCE = new HungrySingleton();

    // 构造方法私有化
    private HungrySingleton() {
    }

    // 对外提供访问的接口
    public static HungrySingleton getInstance() {
        return INSTANCE;
    }

}
